You are here: Statements and Functions > IncResCost
Syntax samples
INCRESCOST <cost expression> {,<resource>}
INCRESCOST 10
INCRESCOST GETRESRATE(Operator1)*20, Operator1
Enables you to increment the cost (positively or negatively) of a resource currently owned by the entity executing the statement. Use this function to add to the resource’s actual, accumulated dollar amount. When used without the optional <resource> parameter, this statement increments the cost rate of the entity’s most recently captured, owned resource.
If an entity owns multiple units of a resource, the cost distributes evenly to each unit.
Operation and move logic.
Components
<cost expression>
The positive or negative change to the value of cost.
<resource>
A resource currently owned by the entity executing the statement. When used without the parameter, this statement increments the cost rate of the entity’s most recently captured, owned resource.
Example
A clerk normally works an 8-hour shift. However, if the clerk does not finish entering all the orders in his Input_Queue at the end of the day, he must stay and finish them. Since the clerk is paid time-and-a-half for any overtime, you must increment the cost of the resource by an additional half of the normal rate to get the overtime rate. To do this, set a variable equal to 1 in the pre-off-shift logic for the resource, indicating the resource should go off-shift. If the variable is equal to 1, increment the cost of a resource by half the original rate.
Process Table
Entity |
Location |
Opn (min) |
---|---|---|
Order |
Order_desk |
GET Clerk, 399 WAIT N (4.5, .3) IF Off_Shift_Var=1 THEN INCRESCOST GETRESRATE() *.50 FREE Clerk |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1
|
Order |
Shipping |
FIRST 1 |
MOVE FOR 1 |
GETCOST(), GETRESRATE(), INCENTCOST, INCLOCCOST, INCRESCOST, and SETRATE.